/**
 * VST解析
 */
public class VST {

    public static void Jiexi(String shuju) {
        String zhuangtai = shuju.substring(0, 2);
        System.out.println("状态为:" + zhuangtai);
        String MAC = shuju.substring(2, 10);
        System.out.println("MAC为:" + MAC);
        String CTRL = shuju.substring(10, 14);
        System.out.println("MAC 控制域+LLC 控制域为:" + CTRL);
        String FRAMEHEAD = shuju.substring(14, 16);
        System.out.println("段字头为:" + FRAMEHEAD);

        //  T-APDU&Dptionsl:C0
        String Dptionsl = shuju.substring(16, 18);
        System.out.println("T-APDU&Dptionsl为:" + Dptionsl);


        //AppListHum:01
//                Ai d:41
//                Di d:
        String Profile = shuju.substring(18, 20);
        System.out.println("Profile为:" + Profile);

        String AppListHum = shuju.substring(20, 22);
        System.out.println("AppListHum为:" + AppListHum);

        String Aid = shuju.substring(22, 24);
        System.out.println("Aid为:" + Aid);
        String Did = shuju.substring(24, 26);
        System.out.println("Did为:" + Did);

        String Option = shuju.substring(26, 28);
        System.out.println("Option为:" + Option);
        String Container = shuju.substring(28, 30);
        System.out.println("Container为:" + Container);

        String SYSInfo  = shuju.substring(30, 82);
        System.out.println("SYSInfo系统信息为:" + SYSInfo);
//        C9CFBAA2FFFFFFO9FFFFO0810001000F424DFFFFFFFFFFFFFFFF
        String ContractProvider  = shuju.substring(30, 46);
        System.out.println("ContractProvider 服务提供商编码为:" + ContractProvider);

        String ContractType   = shuju.substring(46, 48);
        System.out.println("ContractType 协约类型码为:" + ContractType);

        String ContractVersion   = shuju.substring(48, 50);
        System.out.println("ContractVersion 协约版本为:" + ContractVersion);

        String ContractSerialNumber    = shuju.substring(50, 66);
        System.out.println("ContractVersion 合同序列号为:" + ContractSerialNumber );

        String ContractSignedDate    = shuju.substring(66, 74);
        System.out.println("ContractVersion 合同签署日期为:" + ContractSignedDate );
        String ContractExpiredDate     = shuju.substring(74, 82);
        System.out.println("ContractVersion 合同过期日期为:" + ContractExpiredDate );

        String ParametergbICCInfo      = shuju.substring(82, 84);
        System.out.println("ParametergbICCInfo 国标Ic卡预读类型为:" + ParametergbICCInfo  );

        String ICClnfo      = shuju.substring(84, 170);
        System.out.println("ICClnfo 国标Ic卡15文件预读为:" + ICClnfo  );

        String iceBalance      = shuju.substring(170, 178);
        System.out.println("iceBalance 预读金额为:" + iceBalance  );

        String mac      = shuju.substring(178, 186);
        System.out.println("mac2 地址为:" + mac  );

        String version      = shuju.substring(186, 188);
        System.out.println("设备类型&&版本为:" + version  );
        String state      = shuju.substring(188, 190);
        System.out.println("OBU状态为:" + state  );
        String baoliu      = shuju.substring(190, 192);
        System.out.println("保留字段为:" + baoliu  );

//84+86
//                String  Did = shuju.substring(38, 40);
//                System.out.println("Did为:" + Did);
//                iccTransMode:83
//                Container:29
//        String iccTransMode = shuju.substring(38+2, 40+2);
//        System.out.println("iccTransMode为:" + iccTransMode);
//
//        String Container = shuju.substring(40+2, 42+2);
//        System.out.println("Container为:" + Container);

//                ITS 0ption:A0
//                sysLen:1A
//        String ITS0ption = shuju.substring(42+2, 44+2);
//        System.out.println("ITS0ption为:" + ITS0ption);
//        String sysLen = shuju.substring(44+2, 46+2);
//        System.out.println("sysLen为:" + sysLen);
//
//                0ffset02:00
//                Len02:04

//        String offset02 = shuju.substring(46, 48);
//        System.out.println("0ffset02为:" + offset02);
//
//        String Len02 = shuju.substring(48, 50);
//        System.out.println("Len02为:" + Len02);


//                0ffset12:
//                Len12:

//                String offset12  = shuju.substring(48, 50);
//                System.out.println("offset12为:" + offset12);
//
//                String Len12  = shuju.substring(50, 52);
//                System.out.println("Len12为:" + Len12);

//                0ffset15:00
//                Len15:2B
//        String offset15 = shuju.substring(50, 52);
//        System.out.println("offset15为:" + offset15);
//
//        String Len15 = shuju.substring(52, 54);
//        System.out.println("Len15为:" + Len15);
//        //                Offset19:
////                                 Len19:
//        //                ProfileList:00
//        String ProfileList = shuju.substring(54, 56);
//        System.out.println("ProfileList为:" + ProfileList);
    }
}
